{{header}}

import { ContractFactory as __ContractFactory, decompressBytecode } from "fuels";
import type { Provider, Account, DeployContractOptions } from "fuels";

import { {{capitalizedName}} } from "./{{capitalizedName}}";

const bytecode = decompressBytecode("{{compressedBytecode}}");

export class {{capitalizedName}}Factory extends __ContractFactory<{{capitalizedName}}> {

  static readonly bytecode = bytecode;

  constructor(accountOrProvider: Account | Provider) {
    super(
      bytecode,
      {{capitalizedName}}.abi,
      accountOrProvider,
      {{capitalizedName}}.storageSlots
    );
  }

  static deploy (
    wallet: Account,
    options: DeployContractOptions = {}
  ) {
    const factory = new {{capitalizedName}}Factory(wallet);
    return factory.deploy(options);
  }
}
